package com.itheima.zuoye;

public class Teacher extends schoolPersonnel{
    String subject;
//    讲课方法，显示基本信息showMsg方法
    public void showMsg() {
        System.out.println("姓名：" + name + "年龄：" + age + "科目：" + subject);
    }
    public void teach() {
        System.out.println(name + "正在讲课");

    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }
}
